Conversation
|
Sider has detected 1 error and 2 warnings on analyzing the commit b754f13.
If the errors persist even after retrying, the following actions may resolve them:
If you still have problems, feel free to ask us via chat. 💬 You can turn off such notifications if unnecessary. |
|
|
||
| def price_with_tax(ampere, usage) | ||
| # 有効桁数は単価表に合わせ、小数点以下2桁とする | ||
| price(ampere, usage) + (price(ampere, usage) * Simulator::TAX_RATE).round(2) |
| "additional_price": { | ||
| "120": 19.88, | ||
| "300": 26.48, | ||
| "2000000000": 30.57 |
There was a problem hiding this comment.
2000000000は上限に当てはまらないような適当な数値だと思いますが、もう少し良い書き方はないでしょうか?
There was a problem hiding this comment.
jsonのkeyを各プランの上限値 -> 下限値に変更して、マスタデータをよりシンプルにメンテナンスできる様に変更しました。
615ffa3
| end | ||
|
|
||
| def price_with_tax(ampere, usage) | ||
| # 有効桁数は単価表に合わせ、小数点以下2桁とする |
|
はじめまして、柏木と申します。 |
|
お世話になります。高崎です! |
| return result unless result.nil? | ||
|
|
||
| raise Message::NO_UNIT_PRICE | ||
| end |
There was a problem hiding this comment.
hashからpriceを引き出すところはスッキリして良くなったと思います。
ただそもそも従量料金の計算の仕方が誤っています。どう間違っているかまではお伝えしないので、もう一度お調べできますか?
There was a problem hiding this comment.
すみません、今日面談だったことを気にせず申し上げてしまいました。ご無理のない範囲でお時間があれば見てもらえるとありがたいです!
ファイル構成及び役割
plans.json
simulator.rb
plan.rb
補足事項